home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 427_01 / software / minijoy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-17  |  1.3 KB  |  35 lines

  1. /*                                                                        */
  2. /*                                                                        */
  3. /* file MINIJOY.H                                                         */
  4. /*                                                                        */
  5. /* written in 1994 by Christof Ruch                                       */
  6. /*                                                                        */
  7. /*                                                                        */
  8.  
  9. #ifndef _minijoy
  10. #define _minijoy 1
  11.  
  12. #define MAXPLAYER 6                    /* maximum number of players */
  13.  
  14. struct TJoy
  15. {
  16.         signed char x,y;               /* -1 .. +1 (minus is left/up) */
  17.         char        knopf,xtra,        /* buttons held down if != 0   */
  18.                     lhit, rhit,        /* directions triggered if !=0 */
  19.                     uhit, dhit,        /* directions triggered if !=0 */
  20.                     khit, xhit;        /* buttons triggered    if !=0 */
  21. };
  22.  
  23. /* contains all joystick status information */
  24. /* is updated by calling GetAllJoyState     */
  25. extern struct TJoy JoyState[MAXPLAYER];
  26.  
  27. /* you must call this before using GetAllJoyState */
  28. void InitMultijoy ();
  29.  
  30. /* gets status of all joystick ports */
  31. void GetAllJoyState ();
  32.  
  33.  
  34. #endif
  35.